<template>
	<view>
		<view class="agree_text" v-html="content"></view>
	</view>
</template>
<script>
import {registerAgreement} from "@/api/login"
  export default {
    data() {
      return {
		  content:'',
		  innerHeight:'',
      }
    },
	onLoad(option) {
		if(option.math){
			this.getMath()
		}
	},
    created() {
      this.$modal.loading();
		registerAgreement().then(res => {
			uni.hideLoading()
		    this.content = res.data.content;
		});
    },
	onPageScroll(res) {
	    uni.$emit('onPageScroll', this.getMath);
	}, 
	methods:{
		getMath(){
			this.$nextTick(() => {
			  setTimeout(() => {
			    document.getElementsByClassName('agree_text')[0].scrollTop = 7330
			  },300)
			})
		},
	}
  }
</script>
<style scoped lang="scss">
	page{
		background: $uni-bg-color;
	}
	.agree_text{
		padding:30rpx;
		overflow-y: scroll;
		height: 1800rpx;
	}
</style>